#ifndef WRESOURCEMANAGER_H
#define WRESOURCEMANAGER_H

#include "../common.h"

struct ResourceFileInfo
{
    ResourceFileInfo() {}
    ResourceFileInfo(wxDateTime time,wxMemoryBuffer buf)
        : modiftime(time),buffer(buf) {}

    wxDateTime modiftime;
    wxMemoryBuffer buffer;
};

class WResourceManager
{
public:
    WResourceManager();
    ~WResourceManager();

    /// 得到指定文件的数据
    wxMemoryBuffer getFileData(wxString filePath);
    /// 得到指定文件的数据大小
    wxULongLong getFileDataSize(wxString filePath);

private:
    bool ReadFileToMemoryBuffer(const wxString& filePath, wxMemoryBuffer& buffer);

private:
    std::map<wxString,ResourceFileInfo> mResourceFileInfos;
};

#endif // WRESOURCEMANAGER_H
